using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //ieLastName.Text = "Text added dynamically!  Double click me.";
            ieLastName.Text = "O'Toole";
            rpt.DataSource = GetData();
            rpt.DataBind();
        }
    }

    protected void click(object sender, EventArgs e)
    {
        postback.ForeColor = System.Drawing.Color.Red;
        postback.Text = "Postback Values:<br />--------------------------<br />Firstname: " + Server.HtmlEncode(ieFirstName.Text) + "<br />LastName: " + Server.HtmlEncode(ieLastName.Text);
        postback.Visible = true;
    }

    protected void toggle(object sender, EventArgs e)
    {
        if (ieFirstName.Mode == Sys.Web.Ajax.InlineEditBox.InlineEditBoxMode.AdminMode)
        {
            ieFirstName.Mode = Sys.Web.Ajax.InlineEditBox.InlineEditBoxMode.DisplayMode;
            ieLastName.Mode = Sys.Web.Ajax.InlineEditBox.InlineEditBoxMode.DisplayMode;
        }
        else
        {
            ieFirstName.Mode = Sys.Web.Ajax.InlineEditBox.InlineEditBoxMode.AdminMode;
            ieLastName.Mode = Sys.Web.Ajax.InlineEditBox.InlineEditBoxMode.AdminMode;
        }
    }

    protected void time(object sender, EventArgs e)
    {
        lblTime.Text = DateTime.Now.ToString();
    }

    private DataSet GetData()
    {
        DataSet ds = new DataSet();
        DataTable dt = new DataTable();
        dt.Columns.Add("index");

        for (int x = 1; x <= 10; x++)
        {
            DataRow dr = dt.NewRow();
            dr[0] = x.ToString();
            dt.Rows.Add(dr);
        }

        ds.Tables.Add(dt);
        return ds;
    }
}